function ManagerCanvase(canvas)
{
	//画布
	this.canvas = canvas;
	this.ctx = canvas.getContext('2d');
	//坐标系横坐标轴的起始和终点坐标
	this.horizontalPoint=[{x:35,y:660},{x:canvas.width, y:660}];
	//坐标系纵坐标轴的起始和终点坐标
	this.verticalPoinit=[{x:95, y:50},{x:95, y:690}];
	//字体和大小
	this.fontStyle="20px Arial";
	//虚线起始和终点
	this.lineDashPoint = [{x:10,y:150},{x:canvas.width,y:150}];
	//虚线文本坐标
	this.lineDashTextPoint = {x:10,y:(135)};
	//虚线的间隔
	this.lineDashSpace = 40;
	//虚线样式
	this.lineDashStyle = {dashStyle:[15,5],lineWidth:0.5};
}
ManagerCanvase.prototype.draw = function (elementTypes)
{
	//绘制坐标系
	this.ctx.restore();
	this.ctx.beginPath();
	this.ctx.moveTo(this.horizontalPoint[0]['x'], this.horizontalPoint[0]['y']);
	this.ctx.lineTo(this.horizontalPoint[1]['x'], this.horizontalPoint[1]['y']);
	this.ctx.moveTo(this.verticalPoinit[0]['x'],this.verticalPoinit[0]['y']);
	this.ctx.lineTo(this.verticalPoinit[1]['x'],this.verticalPoinit[1]['y']);
	this.ctx.save();
	this.ctx.stroke();
	this.ctx.font = this.fontStyle;
	//写名称画虚线
	for (var i = 0; i < elementTypes.length; i++) {
		this.addLineDash({textPoint:{x:this.lineDashTextPoint['x'],y:this.lineDashTextPoint['y']+this.lineDashSpace*i},
			text:elementTypes[i].text,
			lineStyle:this.lineDashStyle,
			linePoint:[{x:this.lineDashPoint[0]['x'],y:(this.lineDashPoint[0]['y']+this.lineDashSpace*i)},
			           {x:this.lineDashPoint[1]['x'],y:(this.lineDashPoint[1]['y']+this.lineDashSpace*i)}]});
	}
}

/*绘制虚线*/
//canvas画布
/*虚线信息：lineDashObj = {textPoint:{x:10,y:(135+40*i)},
						text:elementTypes[i].text,
						lineStyle:{dashStyle:[15,5],lineWidth:0.5},
						linePoint:[{x:10,y:(150+40*i)},{x:canvas.width,y:(150+40*i)}]};
linePoint 虚线的起点和终点
textPoint 虚线文本位置
text 虚线文本
lineStyle 虚线样式*/
ManagerCanvase.prototype.addLineDash = function (lineDashObj){
	//判断如果有文本就显示，否则不显示
	if(lineDashObj['text']){
		this.ctx.fillText(lineDashObj['text'], lineDashObj['textPoint'].x, (lineDashObj['textPoint'].y));
	}
	//如果没有样式，则显示默认样式
	if(!lineDashObj['lineStyle']){
		lineDashObj['lineStyle'] = {dashStyle:[15,5],lineWidth:0.5};
	}
	this.ctx.save();
	this.ctx.setLineDash(lineDashObj['lineStyle']['dashStyle']);
	this.ctx.lineWidth = lineDashObj['lineStyle']['lineWidth'];
	this.ctx.beginPath();
	this.ctx.moveTo(lineDashObj['linePoint'][0].x, (lineDashObj['linePoint'][0].y));
	this.ctx.lineTo(lineDashObj['linePoint'][1].x, (lineDashObj['linePoint'][1].y));
	this.ctx.stroke();
	this.ctx.closePath();
	this.ctx.restore();
}